package com.ess.project.examine.grade.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ess.project.examine.grade.domain.ExamineGradeEntity;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description:
 * @Date: Created in 2:47 下午 2021/2/27
 * @Author: daihui
 * @Modified By:
 */
@Repository
public interface ExamineGradeMapper extends BaseMapper<ExamineGradeEntity> {

    @Select("SELECT DISTINCT exam_time FROM exam_grade")
    List<ExamineGradeEntity> selectExamineTimeList();

    int deleteGradeByIds(Long[] gradeIds);

    /**
     * 根据人员姓名获取人员成绩并按时间正序排序
     * @param examPersonnel 人员姓名
     * @return
     * @author qlq
     * 2021-04-12
     */
    List<ExamineGradeEntity> getGradesByPersonnel(String examPersonnel,String examTime);

    /**
     * 各类人员成绩对比
     * @param examTime 考核时间
     * @return
     * @author qlq
     * 2021-04-12
     */
    List<ExamineGradeEntity> getChartsDataForGlrycjdb(String examTime);

    /**
     * 整体成绩对比
     * @return
     * @author qlq
     * 2021-04-12
     */
    List<ExamineGradeEntity> getChartsDataForZtcjdb();

    /**
     * 获取某一类别下的人员列表
     * @return
     * @author qlq
     * 2021-04-13
     */
    List<ExamineGradeEntity> getAllPerson(String personnelCategory);

    /**
     * 单科成绩对比
     * @return
     * @author qlq
     * 2021-04-13
     */
    List<ExamineGradeEntity> getDkcjdb(String dkcjdbPersonnelCategory,String[] dkcjdbPersonName,String khkm);

    /**
     * 获取单科成绩对比的时间
     * @return
     * @author qlq
     * 2021-04-13
     */
    List<String> getDkcjdbTime(String dkcjdbPersonnelCategory,String[] dkcjdbPersonName);
}
